import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
var _excluded = ["side", "children"];
import React from 'react';
import { Modal } from 'antd';

var SideBar = /*#__PURE__*/function (_React$PureComponent) {
  _inherits(SideBar, _React$PureComponent);

  var _super = _createSuper(SideBar);

  function SideBar() {
    _classCallCheck(this, SideBar);

    return _super.apply(this, arguments);
  }

  _createClass(SideBar, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          _this$props$side = _this$props.side,
          side = _this$props$side === void 0 ? 'right' : _this$props$side,
          children = _this$props.children,
          other = _objectWithoutProperties(_this$props, _excluded);

      var otherProps = other;

      if (side) {
        otherProps = _objectSpread({
          wrapClassName: "ant-modal-sidebar-".concat(side),
          transitionName: "move-".concat(side)
        }, other);
      }

      return /*#__PURE__*/React.createElement(Modal, otherProps, children);
    }
  }]);

  return SideBar;
}(React.PureComponent);

export { SideBar as default };